package se.ramfelt.psnfriends.model;

import java.util.Comparator;


public class FriendComparator implements Comparator<Friend> {

    public int compare(Friend arg0, Friend arg1) {
        if (arg0.getPresence().equals(arg1.getPresence())) {
            return arg0.getOnlineId().compareTo(arg1.getOnlineId());
        }
        return arg0.getPresence().compareTo(arg1.getPresence());
    }

}
